
# -*- coding: utf-8 -*-
from sqlalchemy.ext.asyncio import AsyncSession

from core.crud import DalBase
from .models import Job, Schedule, JobLogs
from .schemas import JobOut, ScheduleOut, JobLogsOut

class JobDal(DalBase):

    def __init__(self, db: AsyncSession):
        super(JobDal, self).__init__()
        self.db = db
        self.model = Job
        self.schema = JobOut



class ScheduleDal(DalBase):

    def __init__(self, db: AsyncSession):
        super(ScheduleDal, self).__init__()
        self.db = db
        self.model = Schedule
        self.schema = ScheduleOut


class JobLogsDal(DalBase):
    
    def __init__(self, db: AsyncSession):
        super(JobLogsDal, self).__init__()
        self.db = db
        self.model = JobLogs
        self.schema = JobLogsOut